package com.ai.wx.entity;

// Generated 2015-5-18 15:07:11 by Hibernate Tools 4.0.0

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

import com.ai.core.util.Arith;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * AgentBrokerageDraw generated by hbm2java
 */
@Entity
@Table(name = "agent_brokerage_draw", catalog = "wx", uniqueConstraints = @UniqueConstraint(columnNames = "agent_id"))
public class AgentBrokerageDraw implements java.io.Serializable {

	private Integer id;
	private Integer agentId;
	private Integer drawCharge;
	private Date drawDate;
	private Integer drawState;
	private String notes;
	private String reply;
	private Integer state;
	private Date crtDate;
	private Date modDate;
	private String crtUid;
	private String modUid;

	public AgentBrokerageDraw() {
	}

	public AgentBrokerageDraw(Integer agentId, Integer drawCharge, Date drawDate, Integer drawState, String notes, String reply, Integer state, Date crtDate, Date modDate, String crtUid, String modUid) {
		this.agentId = agentId;
		this.drawCharge = drawCharge;
		this.drawDate = drawDate;
		this.drawState = drawState;
		this.notes = notes;
		this.reply = reply;
		this.state = state;
		this.crtDate = crtDate;
		this.modDate = modDate;
		this.crtUid = crtUid;
		this.modUid = modUid;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "Id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "agent_id", unique = true)
	public Integer getAgentId() {
		return this.agentId;
	}

	public void setAgentId(Integer agentId) {
		this.agentId = agentId;
	}

	@Column(name = "draw_charge")
	public Integer getDrawCharge() {
		return this.drawCharge;
	}
	@Transient
	public double getDDrawCharge() {
		return Arith.div100(drawCharge);  
	}
	public void setDrawCharge(Integer drawCharge) {
		this.drawCharge = drawCharge;
	}


	@JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
	@Temporal(TemporalType.DATE)
	@Column(name = "draw_date", length = 0)
	public Date getDrawDate() {
		return this.drawDate;
	}

	public void setDrawDate(Date drawDate) {
		this.drawDate = drawDate;
	}

	@Column(name = "draw_state")
	public Integer getDrawState() {
		return this.drawState;
	}

	public void setDrawState(Integer drawState) {
		this.drawState = drawState;
	}

	@Column(name = "notes")
	public String getNotes() {
		return this.notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	@Column(name = "reply")
	public String getReply() {
		return this.reply;
	}

	public void setReply(String reply) {
		this.reply = reply;
	}

	@Column(name = "state")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "crt_date", length = 0)
	public Date getCrtDate() {
		return this.crtDate;
	}

	public void setCrtDate(Date crtDate) {
		this.crtDate = crtDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "mod_date", length = 0)
	public Date getModDate() {
		return this.modDate;
	}

	public void setModDate(Date modDate) {
		this.modDate = modDate;
	}

	@Column(name = "crt_uid")
	public String getCrtUid() {
		return this.crtUid;
	}

	public void setCrtUid(String crtUid) {
		this.crtUid = crtUid;
	}

	@Column(name = "mod_uid")
	public String getModUid() {
		return this.modUid;
	}

	public void setModUid(String modUid) {
		this.modUid = modUid;
	}

}
